/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controllers;

import db.LoginDb;
import db.LoginInterface;
import models.Employee;
import common.Session;

/**
 *
 * @author pelle
 */
public class LoginController {
    public boolean doLogin(String username, String password) {
        boolean success = false;
        LoginInterface loif = new LoginDb();
        Employee emp = loif.getLoginEmployee(username, password);
        if(emp != null) {
            Session.employee = emp;
            success = true;
        }

        return success;
    }
}
